package com.tqw.client.feign;

import com.tqw.client.pojo.ClientPassword;
import com.tqw.entity.Result;
import com.tqw.pojo.Client;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author Will
 */
@FeignClient(name = "tqw-client",contextId = "clientServer")
public interface ClientFeign {

    @GetMapping("/client/selectUserById")
    Result<Client> selectUserById(@RequestParam("id") Integer id);

    @PostMapping("/client/updateInformation")
    Result<Client> updateInformation(@RequestBody Client client);

    @PostMapping("/client/checkPassword")
    Result<Client> checkPassword(@RequestParam String password);

    @PostMapping("/client/contrastPassword")
    Result<Client> contrastPassword(@RequestBody ClientPassword clientPassword);

    @PostMapping("/client/updatePassword")
    Result<Client> updatePassword(@RequestBody ClientPassword clientPassword);
}
